a11y: Remove default description from GtkSwitch
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 11 Sep 2013 16:37:26 +0000 (18:37 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 12 Sep 2013 09:52:51 +0000 (11:52 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=707926

gtk/a11y/gtkswitchaccessible.c
gtk/gtkswitch.c

index 92e3cb346ab85039d51ff8d733b6bb57b75802ac..669ba1f3ca20488c52b4644703a2e7162b528b89 100644 (file)
@@ -53,22 +53,11 @@ gtk_switch_accessible_ref_state_set (AtkObject *accessible)
   return state_set;
 }
 
-static void
-gtk_switch_accessible_initialize (AtkObject *accessible,
-                                  gpointer   widget)
-{
-  ATK_OBJECT_CLASS (gtk_switch_accessible_parent_class)->initialize (accessible, widget);
-
-  atk_object_set_role (accessible, ATK_ROLE_TOGGLE_BUTTON);
-  atk_object_set_description (accessible, _("Switches between on and off states"));
-}
-
 static void
 gtk_switch_accessible_class_init (GtkSwitchAccessibleClass *klass)
 {
   AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
 
-  atk_class->initialize = gtk_switch_accessible_initialize;
   atk_class->ref_state_set = gtk_switch_accessible_ref_state_set;
 }
 
index 382fbc4430b845bb7972f5aca9590eb8f82afdf2..732d0164088f5551cc8649ac09d16e9939cd18cd 100644 (file)
@@ -894,6 +894,7 @@ gtk_switch_class_init (GtkSwitchClass *klass)
   g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target");
 
   gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SWITCH_ACCESSIBLE);
+  gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TOGGLE_BUTTON);
 }
 
 static void